IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[tr_ProjectEmail_Ins]') AND type in (N'P', N'PC'))
DROP PROCEDURE [dbo].[tr_ProjectEmail_Ins]
GO

CREATE PROCEDURE [dbo].[tr_ProjectEmail_Ins]
	@EmailAddress VARCHAR(MAX),
	@Character VARCHAR(MAX),
    @Description VARCHAR(MAX),
    @EntryDt DATETIME,
    @Subject VARCHAR(MAX),
	@Body VARCHAR(MAX)

AS

DECLARE @EmailId UNIQUEIDENTIFIER
SET @EmailId = NEWID()

INSERT INTO tr_Email 
	(EmailId, EmailAddress, [Character], [Description], EntryDt, [Subject], Body) VALUES
	(@EmailId, @EmailAddress, @Character, @Description, @EntryDt, @Subject, @Body)
	
SELECT @EmailId